<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>助农优品 - {% block title %}{% endblock %}</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .agriculture-theme {
            background-color: #f4f7f2;
        }
        .product-card {
            transition: transform 0.3s;
        }
        .product-card:hover {
            transform: translateY(-5px);
        }
    </style>
</head>
<body class="agriculture-theme">
    <nav class="navbar navbar-expand-lg navbar-dark bg-success">
        <div class="container">
            <a class="navbar-brand" href="/">助农优品</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item"><a class="nav-link" href="{% url 'product_list' %}">产品大厅</a></li>
                    <li class="nav-item"><a class="nav-link" href="{% url 'publish' %}">发布产品</a></li>
                    <li class="nav-item"><a class="nav-link" href="#about">关于我们</a></li>
                </ul>
                <div class="d-flex">
                    {% if user.is_authenticated %}
                        <a href="{% url 'profile' %}" class="btn btn-light me-2">个人中心</a>
                    {% else %}
                        <a href="{% url 'login' %}" class="btn btn-outline-light me-2">登录</a>
                        <a href="{% url 'register' %}" class="btn btn-light">注册</a>
                    {% endif %}
                </div>
            </div>
        </div>
    </nav>

    <main class="container my-5">
        {% block content %}{% endblock %}
    </main>

    <footer class="bg-dark text-white py-4 mt-5">
        <div class="container text-center">
            <p>助农优品 - 连接城乡的桥梁</p>
            <p>联系电话: 400-123-4567 | 邮箱: support@nongye.com</p>
        </div>
    </footer>
    
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
</body>
</html>